*** REPLICATION MASTER FILE for the article:
** "Immigration, Labor Markets and Discrimination: Evidence from the Venezuelan Exodus in Perú"
* By: Andre Groeger, Gianmarco Leon, and Steven Stillman

********************************************************************************
*** INSTALL REQUIRED STATA PACKAGES
********************************************************************************

ssc install outreg2 
ssc install ivreg2
ssc install ranktest
ssc install ivreghdfe
ssc install reghdfe
ssc install ftools

********************************************************************************
*** DEFINE ROOT DIRECTORY (ACTIVATE YOURS)
********************************************************************************

gl root " "

********************************************************************************
*** STEP 1: data creation, descriptive statistics, and graphs
********************************************************************************

include "$root/datacreate_part1"

include "$root/datacreate_part2"

include "$root/datacreate_part2_lapop"

********************************************************************************
*** STEP 2: regression analysis
********************************************************************************

include "$root/regressions_part1"

include "$root/regressions_part2"

include "$root/regressions_part2_lapop"

include "$root/regressions_part2LMextend"

include "$root/regressions_part2_GT"